import {StyleSheet, Text, View, Button} from 'react-native';
import React from 'react';
import {useNavigation, useRoute} from '@react-navigation/native';
import {PlayVideoNavigationProp, PlayVideoRouteProp} from '../../types';

const PlayVideo = () => {
  const route = useRoute<PlayVideoRouteProp>();
  const navigation = useNavigation<PlayVideoNavigationProp>();
  return (
    <View>
      <Text>PlayVideo {route.params.id}</Text>
      <Button
        title="to home"
        onPress={() => {
          navigation.navigate('Home');
        }}></Button>
    </View>
  );
};

export default PlayVideo;

const styles = StyleSheet.create({});
